package com.lagou.service;

import com.lagou.dao.DeptDao;
import com.lagou.domain.Dept;
import com.lagou.domain.Emp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptDao deptDao;

    public List<Emp> findAll() {
        return deptDao.findAll();
    }

    public void save(Emp emp){
        deptDao.save(emp);
    }

    @Override
    public Emp findById(int id) {
        return deptDao.findById(id);
    }

    @Override
    public void update(Emp emp) {
        deptDao.update(emp);
    }

}
